local skill = fk.CreateSkill {
  name = "#ling__ice_sword_skill",
  attached_equip = "ling__ice_sword",
}

Fk:loadTranslationTable{
  ["#ling__ice_sword_skill"] = "寒冰剑",
}

skill:addEffect(fk.AfterCardUseDeclared, {
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(skill.name) and data.card.name == "slash"
  end,
  on_use = function(self, event, target, player, data)
    data:changeCard("ice__slash", data.card.suit, data.card.number, skill.name)
  end,
})

skill:addEffect(fk.PreCardUse, {
  can_refresh = function (self, event, target, player, data)
    return target == player and player:hasSkill(skill.name) and
      data.card.name == "ice__slash" and not data.card:isVirtual()
  end,
  on_refresh = function (self, event, target, player, data)
    data.disresponsiveList = table.simpleClone(player.room.players)
  end,
})

return skill
